package com.hairline.service;

import com.hairline.bean.*;
import com.hairline.bean.vo.CategoryL1VO;

import java.util.List;

public interface GoodsService {
    List<Goods> selectGoodsbyExample(GoodsExample goodsExamp);


    long countByExample(GoodsExample goodsExample);

    Goods selectById(Integer id);

    List<GoodsAttribute> selectAttributeBygoodsId(Integer id);

    List<GoodsSpecification> selectSpecificationByGoodsId(Integer id);


    List<GoodsProduct> selectProductByGoodsId(Integer id);

    Category selectCategoryIdByGoodsCategoryId(Integer categoryId);

    List<CategoryL1VO> selectCategoryL2(Integer pid);

    String selectcategoryL1Name(Integer pid);

    List<CategoryL1VO> selectCategoryL1();


    void deleteBygoodsIdOnAttribute(Integer goodSn);

    void deleteByIdOnGoods(Integer id);

    void deleteBygoodsIdOnProduct(Integer goodSn);

    void deleteBygoodsIdOnSpecification(Integer goodSn);

    int insertSelectiveOnGoods(Goods goods);

    void insertSelectiveOnAttribute(GoodsAttribute attributes);

    void insertSelectiveOnProducts(GoodsProduct products);

    void insertSelectiveOnSpecification(GoodsSpecification goodsSpecification);

    List<CategoryL1VO> selectBrands();

    int insertSelectiveOnGoodsWithGoodsBO(Goods goods);


    boolean insertSelectiveOnSpecificationAddId(List<GoodsSpecification> specifications, int id);

    boolean insertSelectiveOnProductsAddId(List<GoodsProduct> products, int id);

    boolean insertSelectiveOnAttributeAddId(List<GoodsAttribute> attributes, int id);

    boolean updateSelectiveOnGoods(Goods goods);

    boolean updateSelectiveOnSpecification(List<GoodsSpecification> specifications, Integer goodsId);

    boolean updateSelectiveOnProduct(List<GoodsProduct> products, Integer goodsId);

    boolean updateSelectiveOnAttribute(List<GoodsAttribute> attributes, Integer goodsId);

}
